home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 441 / vdisrc12 / vdicntl1.s < prev    next >
Text File  |  1990-11-23  |  4KB  |  115 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* VDIFAST Public Domain VDI bindings.
  5. ;*
  6. ;*========================================================================
  7.  
  8.           .iif      !(^^macdef VContrl),.include  "vdimacro.s"
  9.           
  10. ;*************************************************************************
  11. ;*
  12. ;* Commonly-used control functions.
  13. ;*
  14. ;*************************************************************************
  15.  
  16. ;*------------------------------------------------------------------------
  17. ;* Open workstation.
  18. ;* Open virtual workstation.
  19. ;*------------------------------------------------------------------------
  20.  
  21. _v_opnvwk::
  22.           moveq.l   #100,d0             ;* Open vwork function = 100.
  23.           bra.s     opnwk               ;* Continue below.
  24. _v_opnwk::
  25.           moveq.l   #1,d0               ;* Open work function = 1.
  26. opnwk:
  27.           .cargs   #8,.workin.l,.handle.l,.workout.l
  28.  
  29.           link      a6,#0
  30.           
  31.           move.l    .handle(a6),a0      ;* Handle parm is input and output,
  32.           VContrl   d0,,,#11,(a0)       ;* and is indirect.  
  33.           
  34.           move.l    .workout(a6),a0
  35.           
  36.           pea       90(a0)              ;* -> ptsout
  37.           move.l    a0,-(sp)            ;* -> intout
  38.           subq.l    #4,sp               ;* -> ptsin
  39.           move.l    .workin(a6),-(sp)   ;* -> intin
  40.           pea       16(sp)              ;* -> contrl
  41.           
  42.           moveq.l   #$73,d0
  43.           move.l    sp,d1
  44.           trap      #2
  45.           
  46.           move.l    .handle(a6),a0      ;* VDI handle must be returned
  47.           move.w    -2(a6),(a0)         ;* indirect thru user-supplied ptr.
  48.           
  49.           unlk      a6
  50.           rts
  51.           
  52. ;*------------------------------------------------------------------------
  53. ;*-----------------------------------------------------------------------
  54. ;* vwk_honly 
  55. ;*  For VDI workstation calls that uses a handle only, no input or output.
  56. ;*   Entry:  d0.w = VDI function number.
  57. ;*-----------------------------------------------------------------------
  58. ;*------------------------------------------------------------------------
  59.  
  60. vwk_honly:
  61.           .cargs    #8,.handle.w
  62.           link      a6,#0
  63.           VContrl   d0                  ;* Function is passed in d0.
  64.           pea       (sp)                ;* -> contrl
  65.           
  66.           jmp       vdicall
  67.           
  68. ;*------------------------------------------------------------------------
  69. ;* Close workstation.
  70. ;* Close virtual workstation.
  71. ;*------------------------------------------------------------------------
  72.  
  73. _v_clsvwk::
  74.           moveq.l   #101,d0             ;* Close vwork function = 101.
  75.           bra       vwk_honly
  76. _v_clswk::
  77.           moveq.l   #2,d0               ;* Close work function = 2.
  78.           bra       vwk_honly
  79.           
  80. ;*------------------------------------------------------------------------
  81. ;* Clear workstation.
  82. ;*------------------------------------------------------------------------
  83.  
  84. _v_clrwk::
  85.           moveq.l   #3,d0               ;* Clear workstation code = 3.
  86.           bra       vwk_honly
  87.           
  88. ;*------------------------------------------------------------------------
  89. ;* Update workstation.
  90. ;*------------------------------------------------------------------------
  91.  
  92. _v_updwk::
  93.           moveq.l   #4,d0               ;* Update workstation code = 4.
  94.           bra       vwk_honly
  95.  
  96. ;*------------------------------------------------------------------------
  97. ;* Set clipping rectangle.
  98. ;*------------------------------------------------------------------------
  99.  
  100. _vs_clip::
  101.           .cargs    #8,.handle.w,.clipflag.w,.pxy.l
  102.           link      a6,#0
  103.           
  104.           VContrl   #129,,#2,#1
  105.  
  106.           subq.l    #8,sp
  107.           move.l    .pxy(a6),-(sp)      ;* -> ptsin
  108.           pea       .clipflag(a6)       ;* -> intin 
  109.           pea       16(sp)              ;* -> contrl
  110.  
  111.           jmp       vdicall
  112.           
  113. ;*         end of code
  114.  
  115.